package com.ldwu.home.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * Created by liangdong on 2015/11/12.
 */
@Controller
@RequestMapping("/")
public class Test_IndexController {
    @RequestMapping("/index/{username}")
    public ModelAndView index(@PathVariable String username){
        ModelAndView mv = new ModelAndView("index");
        mv.addObject("title","Hello World");
        mv.addObject("content","This is text page.You name is " + username);
        return mv;
    }
}